import { Application } from "@pixi/app";

type ICreateOptions = {
    width: number
    height: number
    resolution: number
    container: HTMLElement
}

export function createPixiApplition(options: ICreateOptions) {
    const { container, ...appOptions } = options;

    const app = new Application({
        ...appOptions,
        backgroundAlpha: 0,
        autoDensity: false,
        powerPreference: 'default',
    });

    container.appendChild(app.view as any);
    return app;
}